<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" >
        <meta name="format-detection" content="telephone=no"/>
        <meta name="apple-mobile-web-app-capable" content="no">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <title>测试静弹出框</title>
        <style type="text/css">
            html,body,p{
                margin:0;
                padding: 0;
            }
            html{
                background: white;
            }
            body{
                max-width:750px;
                height: 300px;
                margin: 0 auto;
                background: #e0e0e0;
            }
            .wrap{
                padding:10px;
            }
        </style>
    </head>
    <body>
        <div class="wrap">
            <p>在线地址：</p>
            <h3>浏览器中唤醒futunn</h3>
            <button id="openNN">打开牛牛客户端</button><br/>
            <a target="_blank" href="futunn://login">在browser打开登陆</a><br/>
            <a target="_blank" href="futunn://homepage">在chrome打开登陆</a><br/>
            <a target="_blank" href="intent://url/https%3A%2F%2Fnews.futunn.com%2Fmarket%2F12613#Intent;
                scheme=futunn;
                package=cn.futu.trader;
                category=android.intent.category.DEFAULT;
                action=android.intent.action.VIEW;
                S.browser_fallback_url=http://a.app.qq.com/o/simple.jsp?pkgname=cn.futu.trader&g_f=991653;
                end">在chrome打开NEWS
            </a>
        </div>
    </body>
    <script type="text/javascript" src="../index.js?ertwrtwre334"></script>
    <script type="text/javascript" src="//cloudmain.futunn.com/test/business-qq/dist/vconsole.min.js?_=153848431344562"></script>
    <script type="text/javascript">

        /*globals VConsole*/
        new VConsole();

        /*globals Callup*/
        var callup = new Callup({
            // 协议头
            PROTOCAL:'ftnn',

            // 主页
            HOME: 'quote',

            // 唤起失败时的跳转链接
            FAILBACK: {
                ANDROID: 'http://a.app.qq.com/o/simple.jsp?pkgname=cn.futu.trader&g_f=991653',
                IOS:'http://a.app.qq.com/o/simple.jsp?pkgname=cn.futu.trader&g_f=991653'
            },

            // Android apk 相关信息
            APK_INFO: {
                PKG: 'cn.futu.trader',
                CATEGORY: 'android.intent.category.DEFAULT',
                ACTION: 'android.intent.action.VIEW'
            },

            // 唤起超时时间，超时则跳转到下载页面
            LOAD_WAITING: 3000
        });

        document.querySelector("#openNN").addEventListener("click",function(){

            var url = "url/" + encodeURIComponent('https://act.futunn.com');

            callup.loadSchema({
                // 通过NN打开某个链接
                targetURI: url,
                success:function(){
                },
                fail: function(){
                    window.location.href = 'http://a.app.qq.com/o/simple.jsp?pkgname=cn.futu.trader&g_f=991653';
                }
            });
        });

    </script>
</html>
